In [31]:
%runfile H3.py
In [32]:
from utils import (make_M_alphas, 
                   make_poly_from_edges, 
                   poly_equiv, tri0, tri1, tri2, cycle_poly, std_poly,
                   poly_gl2_orbit_reps, 
                   aas_triangle_gl2_orbit_reps, 
                   square_parameters, 
                   aaa_triangle_parameters, 
                   aas_triangle_parameters,
                   hexagon_parameters)
from polyhedra import all_poly_types, poly_type, poly_types
In [33]:
d = 21
In [34]:
kdata = make_k(d)
k = kdata['k']
w = kdata['w']
zero = k(0)
one = k(1)
Ireps = kdata['Ireps']
inf = cusp(infinity, k)
k.class_number()
Out[34]:
4
In [35]:
alphas, sigmas = alpha_sigma_data(d, verbose=False)
#alphas = precomputed_alphas(k)
M_alphas, alpha_inv = make_M_alphas(alphas)
print("{} alphas".format(len(alphas)))

#sigmas = [cusp(s,k) for s in [oo, (w)/(2), (w + 1)/(3), (-w - 1)/(3), (-w + 1)/(3), (w - 1)/(3)]]

print("{} sigmas".format(len(sigmas)))
k = Number Field in w with defining polynomial x^2 + 21, class number 4
12 singular points: [oo, [w + 1:2], [w - 2:5], [-2*w - 1:5], [2*w + 1:5], [-w + 2:5], [5:w - 2], [-w - 8:w - 2], [w + 8:w - 2], [-5:w - 2], [-w:3], [w:3]]
157 covering alphas, max denom norm 84: [[w:2], [-w - 1:3], [w - 1:3], [-w + 1:3], [-w:4], [-w + 2:4], [10:w], [8:w], [5:w], [4:w], [-8:w], [-9:w + 1], [-5:w + 1], [5:w + 1], [9:w + 1], [9:w - 1], [5:w - 1], [w + 2:4], [-4:w], [-5:w], [-5:w - 1], [-w - 5:w - 2], [w + 10:w - 2], [6:w - 2], [w + 9:w - 2], [w + 5:w - 2], [-2*w - 2:5], [2*w - 2:5], [-w - 1:5], [w - 1:5], [-2*w:5], [-w:5], [-w + 1:5], [-2*w + 2:5], [-w + 5:w + 2], [-w + 9:w + 2], [-6:w + 2], [-w + 10:w + 2], [w:5], [2*w:5], [w + 1:5], [2*w + 2:5], [w - 5:w + 2], [w - 8:w + 3], [-w + 4:w + 3], [-w + 10:w + 3], [w - 10:w + 3], [-w + 8:w + 3], [w + 10:w - 3], [w + 4:w - 3], [w + 8:w - 3], [-w - 4:w - 3], [w - 4:w + 3], [-w - 8:w - 3], [-w + 6:w + 4], [-2*w + 6:w + 4], [w - 7:w + 4], [-2*w + 9:w + 4], [-w + 4:w + 4], [-2*w + 8:w + 4], [-w + 3:w + 4], [-w + 7:w + 4], [w - 6:w + 4], [-2*w - 6:w - 4], [w + 7:w - 4], [w + 3:w - 4], [2*w + 8:w - 4], [w + 4:w - 4], [-w - 4:w - 4], [-2*w - 8:w - 4], [2*w + 9:w - 4], [-w - 3:w - 4], [2*w + 6:w - 4], [w + 6:w - 4], [w - 3:w + 4], [2*w - 8:w + 4], [w - 4:w + 4], [2*w - 6:w + 4], [-2*w + 7:w + 5], [2*w - 9:w + 5], [-2*w + 11:w + 5], [-2*w + 9:w + 5], [-2*w - 7:w - 5], [2*w + 9:w - 5], [2*w + 11:w - 5], [2*w + 7:w - 5], [2*w - 7:w + 5], [-2*w - 9:w - 5], [-3*w - 3:7], [3*w - 3:7], [-2*w - 2:7], [2*w - 2:7], [-2*w - 1:7], [2*w - 1:7], [-2*w + 1:7], [-2*w + 2:7], [-3*w + 3:7], [-9:w - 1], [-w - 10:w - 3], [2*w + 2:7], [-2*w + 4:w + 6], [-2*w + 10:w + 6], [-w + 7:w + 6], [-3*w + 7:w + 6], [2*w - 8:w + 6], [-2*w + 8:w + 6], [-3*w + 8:w + 6], [w - 7:w + 6], [2*w - 10:w + 6], [3*w + 7:w - 6], [w + 7:w - 6], [2*w + 10:w - 6], [2*w + 4:w - 6], [-2*w - 4:w - 6], [-3*w - 7:w - 6], [3*w + 8:w - 6], [2*w + 8:w - 6], [2*w - 4:w + 6], [-2*w - 8:w - 6], [-2*w - 10:w - 6], [-w - 7:w - 6], [-2*w - 3:8], [2*w - 3:8], [3*w + 12:w - 7], [-3*w - 8:w - 7], [w + 6:w - 7], [3*w + 6:w - 7], [-3*w - 6:w - 7], [3*w + 8:w - 7], [w - 6:w + 7], [-3*w + 8:w + 7], [-w + 6:w + 7], [-3*w + 6:w + 7], [-3*w + 12:w + 7], [-w - 6:w - 7], [3*w - 6:w + 7], [3*w - 8:w + 7], [-4*w - 4:9], [4*w - 4:9], [-4*w - 2:9], [-4*w + 2:9], [-4*w + 4:9], [3*w + 3:7], [3*w - 7:w + 6], [w + 20:2*w], [13:2*w], [w + 8:2*w], [0:1], [w + 1:3], [w:4], [-w - 6:w - 4], [-w - 7:w - 4], [2*w + 1:7], [4*w + 4:9], [w - 8:2*w], [-13:2*w], [w - 20:2*w]]
30 fundamental domain alphas, max denom norm 84: [[w:2], [-w - 1:3], [w - 1:3], [-w + 1:3], [-w:4], [-w + 2:4], [8:w], [-8:w], [-9:w + 1], [-5:w + 1], [5:w + 1], [9:w + 1], [9:w - 1], [5:w - 1], [w + 2:4], [-5:w - 1], [-9:w - 1], [-4*w - 4:9], [4*w - 4:9], [-4*w + 4:9], [w + 20:2*w], [13:2*w], [w + 8:2*w], [0:1], [w + 1:3], [w:4], [4*w + 4:9], [w - 8:2*w], [-13:2*w], [w - 20:2*w]]
alphas with denominator | 2: [[w:2]]
alphas with denominator | 3: [[w + 1:3], [-w - 1:3], [w - 1:3], [-w + 1:3]]
plus pairs: [(8, w), (w - 20, 2*w), (13, 2*w), (w - 8, 2*w)]
minus pairs: [(w, 4), (w + 2, 4)]
fours: [(9, w - 1), (9, w + 1), (4*w + 4, 9)]
sigmas with denominator 2: [[w + 1:2]]
sigmas with denominator 3: [[w:3], [-w:3]]
other (finite) sigmas: [[w - 2:5], [-w + 2:5], [2*w + 1:5], [-2*w - 1:5], [-5:w - 2], [5:w - 2], [-w - 8:w - 2], [w + 8:w - 2]]
// for copying into geodat.dat
0
0 d=21
0
21 A 0 1 8 0 -8 0
21 A 0 2 -20 1 20 -1
21 A 0 2 13 0 -13 0
21 A 0 2 -8 1 8 -1
21 A 4 0 0 1 0 1
21 A 4 0 2 1 2 1
21 A -1 1 9 0 -5 0
21 A 1 1 9 0 -5 0
21 A 9 0 4 4 -4 4
21 S -2 1 5 0
21 S 2 -1 5 0
21 S 1 2 5 0
21 S -1 -2 5 0
21 S -5 0 -2 1
21 S 5 0 -2 1
21 S -8 -1 -2 1
21 S 8 1 -2 1
alphas: [(0)/(1), (w)/(2), (w + 1)/(3), (-w - 1)/(3), (w - 1)/(3), (-w + 1)/(3), (8)/(w), (-8)/(w), (w - 20)/(2*w), (-w + 20)/(2*w), (13)/(2*w), (-13)/(2*w), (w - 8)/(2*w), (-w + 8)/(2*w), (w)/(4), (-w)/(4), (w + 2)/(4), (-w - 2)/(4), (9)/(w - 1), (-9)/(w - 1), (-5)/(w - 1), (5)/(w - 1), (9)/(w + 1), (-9)/(w + 1), (-5)/(w + 1), (5)/(w + 1), (4*w + 4)/(9), (-4*w - 4)/(9), (4*w - 4)/(9), (-4*w + 4)/(9)]

sigmas: [(1)/(0), (w + 1)/(2), (w)/(3), (-w)/(3), (w - 2)/(5), (-w + 2)/(5), (2*w + 1)/(5), (-2*w - 1)/(5), (-5)/(w - 2), (5)/(w - 2), (-w - 8)/(w - 2), (w + 8)/(w - 2)]

30 alphas
12 sigmas
In [36]:
FD_proj = plot_FunDomain_projection(k, alphas, sigmas)
FD_proj.show(figsize=[10,10])
In [37]:
sigmas
Out[37]:
[oo,
 [w + 1:2],
 [w:3],
 [-w:3],
 [w - 2:5],
 [-w + 2:5],
 [2*w + 1:5],
 [-2*w - 1:5],
 [-5:w - 2],
 [5:w - 2],
 [-w - 8:w - 2],
 [w + 8:w - 2]]
In [38]:
alphas
Out[38]:
[[0:1],
 [w:2],
 [w + 1:3],
 [-w - 1:3],
 [w - 1:3],
 [-w + 1:3],
 [8:w],
 [-8:w],
 [w - 20:2*w],
 [-w + 20:2*w],
 [13:2*w],
 [-13:2*w],
 [w - 8:2*w],
 [-w + 8:2*w],
 [w:4],
 [-w:4],
 [w + 2:4],
 [-w - 2:4],
 [9:w - 1],
 [-9:w - 1],
 [-5:w - 1],
 [5:w - 1],
 [9:w + 1],
 [-9:w + 1],
 [-5:w + 1],
 [5:w + 1],
 [4*w + 4:9],
 [-4*w - 4:9],
 [4*w - 4:9],
 [-4*w + 4:9]]
In [39]:
polys, hemis = all_polyhedra(k, alphas)
print("{} polyhedra constructed".format(len(polys)))
Constructing principal polyhedra
Found 12 orbits
Orbits:
[33]
[26, 27, 31]
[18, 19, 21, 23]
[32]
[0, 1]
[10, 12, 14]
[2, 3, 4, 5]
[16, 17, 20, 22]
[28, 29, 30]
[24, 25]
[11, 13, 15]
[8, 9, 6, 7]
Constructed 12 polyhedra
Faces: [[4, 3, 4, 3, 4], [4, 6, 3, 3, 4, 3, 4, 3], [4, 4, 4, 4, 4, 4], [4, 3, 4, 3, 4], [3, 4, 4, 4, 3], [6, 3, 4, 4, 3, 4, 3, 3], [4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4], [4, 4, 3, 3, 4, 3, 6, 3], [4, 4, 3, 4, 3], [3, 4, 3, 4, 6, 3, 4, 3], [6, 4, 4, 4, 4, 4, 6, 4]]
Constructing polyhedra from one ideal class, sigmas [[w + 1:2]]
i=0, R=[21/44*w + 23/44, 1/88], 4 Rmats
Qlist = [[21/44*w + 23/44, 1/88], [21/44*w + 21/44, 1/88], [23/44*w + 23/44, 1/88], [23/44*w + 21/44, 1/88]]
Qlist indices: [0, 1, 3, 2]
Found 1 orbits with representative points [[0, 1, 2, 3]]:
Constructed 1 polyhedra
Faces: [[4, 3, 3, 3, 3]]
Constructing polyhedra from one ideal class, sigmas [[w - 2:5], [-2*w - 1:5], [2*w + 1:5], [-w + 2:5], [5:w - 2], [-w - 8:w - 2], [w + 8:w - 2], [-5:w - 2]]
i=0, R=[23/110*w - 23/110, 21/550], 4 Rmats
Qlist = [[23/110*w - 23/110, 21/550], [23/110*w + 23/110, 21/550], [-43/110*w + 43/110, 21/550], [-43/110*w - 43/110, 21/550]]
Qlist indices: [0, 26, 22, 6]
i=1, R=[16/85*w - 42/85, 1/85], 4 Rmats
Qlist = [[16/85*w - 42/85, 1/85], [16/85*w + 42/85, 1/85], [-16/85*w - 42/85, 1/85], [-16/85*w + 42/85, 1/85]]
Qlist indices: [1, 25, 18, 15]
i=2, R=[1/5*w - 1/2, 1/100], 4 Rmats
Qlist = [[1/5*w - 1/2, 1/100], [1/5*w - 1/2, 1/100], [-1/5*w + 1/2, 1/100], [-1/5*w + 1/2, 1/100]]
Qlist indices: [2, 2, 12, 12]
i=3, R=[13/55*w - 37/110, 7/220], 4 Rmats
Qlist = [[13/55*w - 37/110, 7/220], [13/55*w + 37/110, 7/220], [-47/110*w + 18/55, 7/220], [-47/110*w - 18/55, 7/220]]
Qlist indices: [3, 27, 23, 5]
i=4, R=[-2/5*w, 1/25], 4 Rmats
Qlist = [[-2/5*w, 1/25], [-2/5*w, 1/25], [2/5*w, 1/25], [2/5*w, 1/25]]
Qlist indices: [4, 4, 10, 10]
i=7, R=[-11/30*w - 1/10, 1/30], 4 Rmats
Qlist = [[-11/30*w - 1/10, 1/30], [-11/30*w + 1/10, 1/30], [11/30*w - 1/10, 1/30], [11/30*w + 1/10, 1/30]]
Qlist indices: [7, 24, 19, 9]
i=8, R=[43/110*w + 43/110, 21/550], 4 Rmats
Qlist = [[43/110*w + 43/110, 21/550], [43/110*w - 43/110, 21/550], [-23/110*w - 23/110, 21/550], [-23/110*w + 23/110, 21/550]]
Qlist indices: [8, 20, 16, 14]
i=11, R=[47/110*w + 18/55, 7/220], 4 Rmats
Qlist = [[47/110*w + 18/55, 7/220], [47/110*w - 18/55, 7/220], [-13/55*w - 37/110, 7/220], [-13/55*w + 37/110, 7/220]]
Qlist indices: [11, 21, 17, 13]
Found 8 orbits with representative points [[10, 4], [1, 18, 25, 15], [17, 13, 11, 21], [8, 16, 20, 14], [2, 12], [27, 3, 5, 23], [24, 9, 19, 7], [0, 26, 22, 6]]:
Constructed 8 polyhedra
Faces: [[3, 3, 3, 3, 3, 3, 3, 3], [3, 4, 3, 3, 3], [3, 4, 3, 3, 3], [4, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3], [3, 4, 3, 3, 3], [3, 3, 3, 3, 4], [3, 3, 4, 3, 3]]
Constructing polyhedra from one ideal class, sigmas [[-w:3], [w:3]]
i=0, R=[-11/30*w + 1/10, 1/30], 4 Rmats
Qlist = [[-11/30*w + 1/10, 1/30], [-11/30*w - 1/10, 1/30], [11/30*w + 1/10, 1/30], [11/30*w - 1/10, 1/30]]
Qlist indices: [0, 1, 7, 6]
i=2, R=[-29/93*w - 1/31, 1/93], 4 Rmats
Qlist = [[-29/93*w - 1/31, 1/93], [-29/93*w + 1/31, 1/93], [29/93*w - 1/31, 1/93], [29/93*w + 1/31, 1/93]]
Qlist indices: [2, 3, 5, 4]
Found 2 orbits with representative points [[0, 1, 6, 7], [2, 3, 4, 5]]:
Constructed 2 polyhedra
Faces: [[3, 3, 3, 3, 4], [3, 4, 3, 3, 3]]
23 polyhedra constructed
In [40]:
poly_types(polys)
Out[40]:
{'tetrahedron': 0,
 'cube': 3,
 'octahedron': 2,
 'triangular prism': 4,
 'square prism': 9,
 'hexagonal prism': 1,
 'hexagonal cap': 4,
 'truncated tetrahedron': 0,
 'cuboctahedron': 0,
 'unknown': 0}
In [41]:
all_poly_types(polys)
Out[41]:
['triangular prism',
 'hexagonal cap',
 'cube',
 'triangular prism',
 'triangular prism',
 'hexagonal cap',
 'cube',
 'cube',
 'hexagonal cap',
 'triangular prism',
 'hexagonal cap',
 'hexagonal prism',
 'square prism',
 'octahedron',
 'square prism',
 'square prism',
 'square prism',
 'octahedron',
 'square prism',
 'square prism',
 'square prism',
 'square prism',
 'square prism']
In [42]:
assert len(polys)==23
for G in polys: show(G)
In [43]:
triangles = [make_poly_from_edges(t,k) for t in sum([[F for F in G.faces() if len(F)==3] for G in polys],[])]
squares = [make_poly_from_edges(t,k) for t in sum([[F for F in G.faces() if len(F)==4] for G in polys],[])]
hexagons = [make_poly_from_edges(t,k) for t in sum([[F for F in G.faces() if len(F)==6] for G in polys],[])]
aaa_triangles = [T for T in triangles if is_poly_principal(T)]
aas_triangles = [T for T in triangles if not is_poly_principal(T)]
In [44]:
[len(t) for t in [aaa_triangles, aas_triangles, squares, hexagons]]
Out[44]:
[24, 52, 57, 6]
In [45]:
aaa_triangles0 = poly_gl2_orbit_reps(aaa_triangles, alphas)
aas_triangles0 = aas_triangle_gl2_orbit_reps(aas_triangles, alphas)
squares0 = poly_gl2_orbit_reps(squares, alphas)
hexagons0 = poly_gl2_orbit_reps(hexagons, alphas)
In [46]:
[len(t) for t in [aaa_triangles0, aas_triangles0, squares0, hexagons0]]
Out[46]:
[4, 13, 11, 2]
In [53]:
triangles0 = [T for T in aaa_triangles0 if any(poly_equiv(T, t) for t in [tri0(k), tri1(k), tri2(k)])]
triangles1 = [T for T in aaa_triangles0 if not any(poly_equiv(T, t) for t in [tri0(k), tri1(k), tri2(k)])]
triangles0, triangles1
Out[53]:
([[[0:1], oo, [-1:-1]]],
 [[[w + 1:-3], oo, [w + 2:-3]],
  [[w:4], oo, [5:-w - 1]],
  [[-4*w - 4:9], oo, [-4*w - 5:9]]])
In [48]:
aaa = [aaa_triangle_parameters(T, alphas, M_alphas) for T in triangles1]
21 T 2 4 2 1 0
21 T 14 24 20 0 0
21 T 26 28 26 1 0
In [49]:
aas = [aas_triangle_parameters(T, alphas, M_alphas, sigmas) for T in aas_triangles0]
21 U 9 1 1 -1 -1
21 U 1 1 1 0 0
21 U 1 11 7 0 1
21 U 6 7 10 0 0
21 U 0 5 9 0 0
21 U 13 9 4 0 0
21 U 21 9 6 0 0
21 U 17 5 9 -1 0
21 U 23 10 5 0 0
21 U 4 10 6 0 0
21 U 6 3 2 0 0
21 U 5 3 3 0 0
21 U 10 3 2 0 0
In [50]:
squ = [square_parameters(S, alphas, M_alphas, alpha_inv) for S in squares0]
21 Q 17 5 17 5 1 0 -1 0 0 0
21 Q 18 5 24 0 0 0 0 0 0 0
21 Q 19 28 25 3 0 0 0 0 0 0
21 Q 17 23 1 21 0 0 0 0 -1 0
21 Q 1 26 1 26 0 0 0 0 0 0
21 Q 8 28 9 29 -1 0 -1 0 0 0
21 Q 9 1 8 1 0 1 0 0 -1 -1
21 Q 0 12 0 13 1 0 1 0 0 0
21 Q 11 14 10 15 0 0 0 0 0 0
21 Q 5 11 4 10 0 0 0 0 0 0
21 Q 7 2 6 3 0 0 0 0 0 0
In [51]:
hex = [hexagon_parameters(H, alphas, M_alphas) for H in hexagons0]
21 H 0 14 14 0 0 14 0 0 0 0 0 0 0 0 0 0
21 H 14 2 4 14 14 2 0 0 0 0 0 0 0 0 0 0
In [52]:
plot_Bianchi_diagram(k,hemis)
Out[52]:
In [ ]: